CMD always causes "Windows Will Shut Down In Less Than a Minute"
I've been having this problem since I got this computer from a friend of mine over the summer. I remember the problem happening in Vista, and when I upgraded to Win7 Release Candidate (Ultimate) it didn't go away. Every time I open a command prompt by typing CMD in the star menu, a window comes up saying that windows will shut down in less than a minute, and the computer shuts down within 10-15 seconds (Desktop is off within about 2, then another 10 seconds or so for the hardware to shut off). This couldn't bother me so much except it also happens when certain programs update or I try to install certain things that open a command prompt window. It also happens in safe mode, and I just ran Malwarebyte's Anti-Malware on quick mode, which didn't fix it. I'm running a complete scan as I type this, but that will probably take several hours and I wanted to post this before I get frustrated and give up on fixing it again. I tried using the Windows malicious software removal tool and it didn't find anything (which is why I tried Malwarebyte's, and that found 9 infections that were there but apparently not the source of the problem). Could this actually be a corrupt system file and not a case of malware? I've also tested this in safe mode, and the shutdown still happens. I tried to see what processes start up when the shutdown happens to see if any malware was coming on and doing this, but the picture I took doesn't show anything that isn't Windows software opening (conhost.exe, cmd.exe, and wlrmdr.exe all open up just before the computer shuts down). I don't know what other information I can give about this. If you need any more, please tell me how to get it and I will be sure to find it for you. Thanks, Dustin
January 10th, 2010 3:46pm

Sounds like a hardware problem. Its either overheating or a capcitator has gone bad but it is most likely a virus that has never been removed. See this http://www.troublefixers.com/computer-shutdown-restart-when-you-type-cmd-in-run-to-launch-command-prompt/ but keep in mind, the end of your usefulness of this operating system is near its end.My fix would be just to format the thing and put whatever operating I own (what machine is this? OEM Dell, HP, homebrew?) Go to Microsoft's OneCare for an online scanning of your system. Don't know what AV you are using but are you sure its even up to date and functional? MCSE, MCSA, MCDST [If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.]
Free Windows Admin Tool Kit Click here and download it now
January 10th, 2010 4:41pm

Couldn't get my post back open for editing, but here's the link for OneCare online scanning for Windows 7http://onecare.live.com/site/en-my/center/whatsnew.htmMCSE, MCSA, MCDST [If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.]
January 10th, 2010 4:44pm

I tried onecare. It ran for several hours (overnight) and then in the morning it removed a few viruses, but said some were unfixable, so I deleted them myself. Then it said there were other errors it was about to fix, just before I got the message that the scanner host crashed, and it said the run was over. I guess it actually finished and the computer saw it closing itself as a crash, since I let it run again today while I was at work, and it came up with no virus problems, but a slew of registry problems. For whatever reason, it said that the user (me) told it not to correct a bunch of the registry errors, so I don't know if I need to run something else since the safetyscanner isn't working, or if there's something else I can do to correct the registry errors without messing up my registry by doing 150-300 corrections manually. I can get a copy of Win7 from my school for free (I'm a grad student), but I really don't want to lose what's already on my computer, and don't own a portal hdd to back everything up. If I can find someone who does have one and is willing to loan it to me for a weekend I'll just do that soon since I know the RC is expiring in a few months. But for now, the problem is still happening. And the troublefixers article doesn't help, since none of those files mentioned are on my computer, even though I have the same symptoms. It does seem like a virus, even that same one, but I can't find those files on the computer, or any processes running that shouldn't be. Is it possible for a virus to infect the actual cmd.exe file so it just causes a shutdown when run? Thanks, Dustin p.s. It just occurred to me that the previous owner of this computer was obsessed with security and works as an IT/network guy for the army. I have a feeling that he may have configured something so cmd can't open unless you know how to undo what he did, as a way to prevent people/viruses from using the command prompt. I'm going to give him a call and find out if that's the case, but it's a long shot.
Free Windows Admin Tool Kit Click here and download it now
January 11th, 2010 6:22pm

I tried onecare. It ran for several hours (overnight) and then in the morning it removed a few viruses, but said some were unfixable, so I deleted them myself. Humbly and all due respect,You did great up until "I deleted them myself", unless you're paraphrasing, then nevermind."windows\system32\Shutdown.exe" behaves a whole lot like that, and maybe, the registry entry for cmd.exe calls shutdown, but that's guessing out loud. hkcr\cmdfile\shell\runas\command or one of the other entries has been modified,maybe hmm
January 11th, 2010 9:25pm

Can you tell me what your hkey_classes_root\cmdfile\shell\runas\command reads? Here's copy-pasted from the modify option for command: %SystemRoot%\System32\cmd.exe /C "%1" %* What happened was OneCare found 1-2 files that triggered several different virus notices. The previous owner of this laptop did tell me that he kept a virus on his flash drive for security tests or something, and he had backed up his flash drive, which is where the file was. I don't think it was running on the computer, but the file was there, so I just deleted it and its folder, so it couldn't accidentally get run in the future.
Free Windows Admin Tool Kit Click here and download it now
January 11th, 2010 11:13pm

Hi, Your HKEY_CLASSES_ROOT\cmdfile\shell\runas\command value is correct. I suspect that some settings on the computer prevent CMD from running. As you mentioned, calling previous owner to confirm it is a best choice. If the Windows 7 installation disc is available, you can try a clean install this time to check if the issue still occurs on the fresh installed system. hope it helpsVivian Xing - MSFT
January 12th, 2010 2:56am

In System Propeties, Advanced tab, check environment variable Com Spec. It should be %SystemRoot%\system32\cmd.exe You could also goto/runfrom C:\Windows\system32\Cmd.exe
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 3:24am

Still no luck, and the previous owner isn't getting back to me. Running CMD from the file itself still causes the shutdown. Any time CMD is opened (even if it's done by a program in the background or and updater), it causes the same shutdown. And the Com Spec variable matches what you have up there, Gonzo.
January 18th, 2010 1:34pm

it removed a few viruses, but said some were unfixable, so I deleted them myself. Clearly your system is not in a state that it can be fixed. Viruses/malware don't always preserve all the data on your system, and so there may be permanent damage that only a complete reinstallation will fix.I recommend you copy whatever data you really want to keep to a backup, then format and reinstall the entire system.-Noel
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2010 2:49pm

Still no luck, and the previous owner isn't getting back to me. Running CMD from the file itself still causes the shutdown. Any time CMD is opened (even if it's done by a program in the background or and updater), it causes the same shutdown. And the Com Spec variable matches what you have up there, Gonzo. hi fallenstad could you fix your problem? because i have the same problem and i would like to know you did
March 28th, 2010 11:47am

My guess is a little different ... someone/something may have copied the SHUTDOWN.EXE program over the top of the CMD.EXE program ... thus, every time you think you are running CMD, you end up running SHUTDOWN instead. The best candidate for the cause this is likely to be a virus, not a person (its the sort of bloody-minded ____ that virus writers get up to). On my Windows 7 system, CMD.EXE is 301,568 bytes, whereas my SHUTDOWN.EXE is 30,720 bytes. Hope this is helpful.
Free Windows Admin Tool Kit Click here and download it now
March 29th, 2010 12:04am

No, I'm sorry, ledkof. I never did figure it out. Since my Windows 7 RC is expired, I'm going to have to update anyway, and this time instead of just installing over the old OS (which was Vista), I'm going to go with a full reformat. Hopefully that will fix the problem--if not, then something is really, disastrously wrong. The only reason I was hesitant about that was getting all my drivers, which I've never had luck with in the past when I reformat a computer (I invariably get yellow exclamation points over half my devices that I have but don't know the function of). Maybe this time it won't be so troublesome since I still have the HP partition that substitutes for OEM installation discs, and that, in theory, should have all my drivers somewhere in it. And Frosticle, my cmd.exe size is 336KB, so I don't think it was rewritten with shutdown.exe, but that was a good thing to check that I should have done from the get-go, so thank you for that recommendation.
March 29th, 2010 1:17pm

Actually, I just found this (I hope I'm allowed to post links to other forums, I apologize if not): http://networking.ittoolbox.com/groups/technical-functional/networkadmin-l/system-shutdown-when-running-cmd-2355769 One person said that the file "pc-off.bat" may have infected the system. A simple search for that file turned it up. I'll check out another recommendation, about the rontokbro virus on there.
Free Windows Admin Tool Kit Click here and download it now
March 29th, 2010 1:25pm

Sounds like a hardware problem. MCSE, MCSA, MCDST [If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.] Oh, really?! I sincerely hope you were joking.
April 16th, 2012 7:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics